﻿#pragma once

#include "common.h"
#include <list>

namespace anip
{
	namespace ui
	{
		namespace native
		{
			enum class MessageType
			{
				None, Info, Warning, Error, Question
			};

			enum class DialogButtonSet
			{
				Ok, OkCancel, YesNo, AbortRetryIgnore
			};

			enum class DialogButton
			{
				Unknown, Ok, Cancel, Yes, No, Abort, Retry, Ignore
			};

			struct FileFilterItem
			{
				const wstring description;
				const wstring filter;
			};

			DialogButton messageBox(
				const wstring& msg, 
				MessageType type = MessageType::None, 
				DialogButtonSet buttons = DialogButtonSet::Ok,
				const wstring& title = L"");

			wstring openFileDialog(
				const wstring& path, 
				const wstring& defaultName = L"", 
				const std::list<FileFilterItem>& filter = {},
				int defaultFilter = -1);
				
				
			wstring saveFileDialog(
				const wstring& path, 
				const wstring& defaultName = L"",
				const std::list<FileFilterItem>& filter = {},
				int defaultFilter = -1,
				const wstring& defaultExt = L"");

			wstring directorySelectionDialog(const wstring& path);
		}
	}
}